

#include "VideoChannel.h"

bool VideoChannel::bindCapture(ICapture *pCapture) {
  if (pCapture) {
    _pCapture = pCapture;
    return true;
  }
  return false;
}

void VideoChannel::unbindCapture(ICapture *pCapture) {
  if (_pCapture == pCapture) {
    _pCapture = nullptr;
  }
}

bool VideoChannel::bindRender(IRender *pRender) {
  if (pRender == nullptr)
    return false;

  Render_Start(pRender);
  _RenderList.push_back(pRender);

  return true;
}

void VideoChannel::unbindRender(IRender *pRender) {
  if (pRender == nullptr)
    return;

  Render_Stop(pRender);
  _RenderList.remove(pRender);
}

ChannelType VideoChannel::getChannelType() {
  return ChannelType_Video;
}

MediaType VideoChannel::getMediaType() {
  return MediaType_Video;
}

const char *VideoChannel::getClassName() {
  return "VideoChannel";
}

void VideoChannel::toString() {
  LOG_TEST("VideoChannel()")
}